package com.rbcs.budget.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

import com.systop.core.model.BaseModel;

@SuppressWarnings("serial")
@Entity
@Table(name = "budget_item_months")
public class BudgetItemMonth extends BaseModel {

	private Integer id;

	// 季度
	private Integer qtr;

	// 月份
	private Integer month;

	private double amount;
	
	// 第1次追加
	private double add1th;
	
	// 第2次追加
	private double add2th;
	
	// 第3次追加
	private double add3th;
	
	// 第4次追加
	private double add4th;

	// 最终金额
	private double finalAmount;

	// 财务科目
	private BudgetItem budgetItem;

	@Id
	@GeneratedValue(generator = "hibseq")
	@GenericGenerator(name = "hibseq", strategy = "hilo")
	@Column(name = "id", nullable = false)
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getQtr() {
		return qtr;
	}

	public void setQtr(Integer qtr) {
		this.qtr = qtr;
	}

	public Integer getMonth() {
		return month;
	}

	public void setMonth(Integer month) {
		this.month = month;
	}

	public double getAmount() {
		return amount;
	}

	public void setAmount(double amount) {
		this.amount = amount;
	}

	public double getAdd1th() {
		return add1th;
	}

	public void setAdd1th(double add1th) {
		this.add1th = add1th;
	}

	public double getAdd2th() {
		return add2th;
	}

	public void setAdd2th(double add2th) {
		this.add2th = add2th;
	}

	public double getAdd3th() {
		return add3th;
	}

	public void setAdd3th(double add3th) {
		this.add3th = add3th;
	}

	public double getAdd4th() {
		return add4th;
	}

	public void setAdd4th(double add4th) {
		this.add4th = add4th;
	}

	public double getFinalAmount() {
		return finalAmount;
	}

	public void setFinalAmount(double finalAmount) {
		this.finalAmount = finalAmount;
	}

	@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
	@JoinColumn(name = "budget_item_id")
	public BudgetItem getBudgetItem() {
		return budgetItem;
	}

	public void setBudgetItem(BudgetItem budgetItem) {
		this.budgetItem = budgetItem;
	}
	
}
